package com.dstz.bpm.api.constant;

public enum NodeType {
   START("StartNoneEvent", "开始节点"),
   END("EndNoneEvent", "结束节点"),
   USERTASK("UserTask", "用户任务节点"),
   SIGNTASK("SignTask", "会签任务节点"),
   SUBPROCESS("SubProcess", "子流程"),
   CALLACTIVITY("CallActivity", "外部子流程"),
   EXCLUSIVEGATEWAY("ExclusiveGateway", "分支网关"),
   PARALLELGATEWAY("ParallelGateway", "同步网关"),
   INCLUSIVEGATEWAY("InclusiveGateway", "条件网关"),
   SUBSTARTGATEWAY("SubStartGateway", "内嵌子流程开始网关"),
   SUBENDGATEWAY("SubEndGateway", "内嵌子流程结束网关"),
   SUBMULTISTARTGATEWAY("SubMultiStartGateway", "多实例内嵌子流程开始网关"),
   SERVICETASK("ServiceTask", "服务任务节点");

   private String key = "";
   private String value = "";

   private NodeType(String key, String value) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public static NodeType fromKey(String key) {
      NodeType[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         NodeType c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }
}
